import Vue from 'vue'
import App from './App.vue'

// 核心插件
import main from '@/plugin/main'

// store
import store from '@/store/index'


// 菜单和路由设置
import router from './router'
// 更改页面默认样式
import 'u-reset.css';
// 全局样式
import '@/assets/style/formsandtables.scss'

import {frameInRoutes} from '@/router/routes'
import cookies from "@/libs/cookies";


/* 引入axios */
import axios from "axios";

Vue.prototype.$axios = axios;


import VueAMap from 'vue-amap';

Vue.use(VueAMap)
VueAMap.initAMapApiLoader({
    key: '492faea9571f417164df9f83704f5cfe',
    plugin: [
        'DistrictLayer',
        'ToolBar'
    ],
    v: '1.4.15'
});

// 核心插件
Vue.use(main)


new Vue({
    store,
    router,
    render: h => h(App),
    async created() {
        await this.$store.commit('store/page/init', frameInRoutes)
        await this.$store.commit('store/page/menu', frameInRoutes)
    },
    mounted(){

    },


}).$mount('#app')
